/* 
接口可以描述函数类型
*/
interface SearchFunc {
  (source: string, subString: string): boolean
}

const mySearch: SearchFunc = (x:string, y: string):boolean => {
  return x.includes(y)
}

console.log(mySearch('abcd', 'cb'))